package com.clt.ess.gjzw.domain;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

//上传备案信息查询并下载公安下发数据接口的data对象
public class FileData implements Serializable {
    //每个申请包处理的返回结果，0 是成功，其他表示错误
    //必须
    private String errorCode;
    //公安下发的数据信息
    //必须
    @SerializedName("package")
    private FilePackage filePackage;

    /**
     {
         "errorCode": "0",
         "package":{
             "yzbm": "印章编码",
             "appSymKeyEnc": "BASE64 编码的应用维护对称密钥密文",
             "dataSymKeyEnc": "BASE64 编码的数据加密对称密钥密文",
             "encFile": "公安下发的加密文件"
         }
     }
     */

    public FileData() {
    }

    public FileData(String errorCode, FilePackage filePackage) {
        this.errorCode = errorCode;
        this.filePackage = filePackage;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public FilePackage getFilePackage() {
        return filePackage;
    }

    public void setFilePackage(FilePackage filePackage) {
        this.filePackage = filePackage;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"errorCode\":\"")
                .append(errorCode).append('\"');
        sb.append(",\"package\":")
                .append(filePackage);
        sb.append('}');
        return sb.toString();
    }
}
